<?php $this->beginContent('//layouts/main'); ?>

		<div id="rightpane">
		<div id="sidebar">
		<?php
			if(Yii::app()->user->isGuest) $this->widget('UserMenu');

		$this->beginWidget('zii.widgets.CPortlet', array(
		'title'=>'Welcome '.Yii::app()->user->name,));
		$this->widget('zii.widgets.CMenu', array(
			'items'=>array(array('label'=>'Logout ('.Yii::app()->user->name.')', 'url'=>array('/site/logout'), 'visible'=>!Yii::app()->user->isGuest),),
			'htmlOptions'=>array('class'=>'operations'),
		));

		$this->endWidget();
		$auth = Yii::app()->authManager;
		if($auth->isAssigned('admin', Yii::app()->user->name)) {
			echo Yii::app()->user->name;
			$this->beginWidget('zii.widgets.CPortlet', array(
				'title'=>'Admin Operations',
			));
			$this->widget('zii.widgets.CMenu', array(
				'items'=>$this->menu,
				'htmlOptions'=>array('class'=>'operations'),
			));
			$this->endWidget();
		}
		?>
		</div><!-- sidebar -->
		</div>
		<div id="subcontent">
			<?php if(isset($this->breadcrumbs)):?>
		<?php $this->widget('zii.widgets.CBreadcrumbs', array(
		'links'=>$this->breadcrumbs, 'separator' => '',
	)); ?><!-- breadcrumbs -->
	<?php endif?>
		<?php echo $content; ?>
		</div>
<?php $this->endContent();?>